home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0032-Object Pascal +-Aug89 < prev    next >
Encoding:
Text File  |  1989-08-22  |  1.3 KB  |  39 lines  |  [TEXT/GEOL]

  1. Item    5514718                         10-Aug-89        13:45
  2.  
  3. From:   D1220                           Vari-Lite, Andy Meldrum,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    Object Pascal +
  8.  
  9. Re : Upgrades to Object Pascal
  10.  
  11. I'd like to see a built in ( i.e no funky stuff with ProcPtrs & Inlines )
  12. mechanism to pass a method as a parameter. As an example, I'd like to do make
  13. method calls similar to those Object methods calls listed below ( from
  14. Smalltalk / V )
  15.  
  16.  
  17.     perform: aSymbol
  18.     "Answer the result of sending a unary message to the
  19.      receiver with selector aSymbol. Report an error if the
  20.      number of arguments expected by the selector is not
  21.      zero."
  22.  
  23. perform: aSymbol withArguments: anArray
  24.     "Answer the result of sending a message to the receiver
  25.      with selector aSymbol and arguments the elements of
  26.      anArray. Report an error if the number of arguments
  27.      expected by the selector is not equal to anArray size."
  28.  
  29. From what I've seen so far its easy to send a Procedure or Function as a
  30. Parameter as long as its not nested, but it is trickier to send a method. If
  31. someone is willing to post a way that I could parameterise a method I'd be
  32. grateful.
  33.  
  34. This request is pretty much in the same vein as wanting to pass the sort method
  35. as a parameter, but has arisen from doing something completely different.
  36.  
  37. Andy.
  38.  
  39.